﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="BlogArticleCommentAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Blog.BlogArticleCommentAdmin" %>
<owc:OwGrid ID="OwBlogArticleComment" runat="server" AutoGenerateColumns="False"
    SkinID="OwGridAdmin" DataSourceID="OwBlogArticleCommentOds" 
    OwEnableMessageDisplay="True" OwMessageDisplayType="InPlace" 
    Style="margin-top: 15px">
    <MasterTableView DataSourceID="OwBlogArticleCommentOds" DataKeyNames="BlogArticleCommentID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:Code %>'>
                <ItemTemplate>
                    <%# Eval("BlogArticleCommentID")%>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn HeaderText='<%$ OwR:InfoLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td colspan="2">
                                <a href="#" onclick='return false;'><b><i>
                                    <%# Eval("Title")%></i>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="BlogArticles" runat="server" OwText="BlogArticles" OwPrefix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#OwBlogArticleCommentsBLL.OwGetEntity((long?)Eval("BlogArticleID")).Name %>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="EmailOwR" runat="server" OwText="Email" OwPrefix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("Email")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="WebSiteOwR" runat="server" OwText="WebSite" OwPrefix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("Website")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="IPOwR" runat="server" OwText="IP" OwPrefix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("IP")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR ID="DateTimeCreatedLabelOwR" runat="server" OwText="DateTimeCreatedLabel"
                                    OwPrefix=":"></owc:OwR>
                            </td>
                            <td>
                                <%#Eval("DateTimeCreated").OwToDateTimePublishDate()%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" FilterControlAltText="Filter TemplateColumn1 column"
                HeaderText="<%$OwR:Modify%>" UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <a href='/Admin/Views/Site/BlogArticlesCommentEdit.aspx?ID=<%#Eval("BlogArticleCommentID")%>'>
                        <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                            id="UpdateImage" /></a></ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn AllowFiltering="False" UniqueName="TemplateColumn" HeaderText="<%$OwR:Deleted %>">
                <ItemTemplate>
                    <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                        ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                        ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <EditColumn FilterControlAltText="Filter EditCommandColumn column">
            </EditColumn>
            <FormTemplate>
                <%
                    Response.Redirect("BlogArticlesCommentEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="OwBlogArticleCommentOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwBlogArticleCommentsEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwBlogArticleCommentsBLL"
    UpdateMethod="OwUpdate">
    <DeleteParameters>
        <asp:Parameter Name="blogArticleCommentID" Type="Int64" />
    </DeleteParameters>
    <SelectParameters>
        <asp:Parameter Name="parentID" Type="Int64" />
        <asp:Parameter DbType="Guid" Name="userID" />
        <asp:Parameter Name="blogArticleID" Type="Int64" />
        <asp:Parameter Name="ip" Type="String" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
